package Thread;

public class Demo8 {
    public static void main(String[] args) throws InterruptedException {
        Thread t = new Thread(() -> {  //创建了Thread的实例
            try {
                Thread.sleep(2000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        });

        t.start();  //这个操作才是在系统中创造线程(PCB才真正创建出来并且加入到链表中)
        Thread.sleep(1000);
        System.out.println(t.isAlive());  //判断系统中的线程是否依然存在
    }
}
